package editor.animation;

import javax.swing.*;
import javax.swing.tree.DefaultTreeCellRenderer;
import java.awt.*;

public class ColoredNodeRenderer extends DefaultTreeCellRenderer {
	public Component getTreeCellRendererComponent(JTree tree, Object value,
	                                              boolean sel,
	                                              boolean expanded,
	                                              boolean leaf, int row,
	                                              boolean hasFocus) {
		super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);

/*		JTree.DropLocation dropLocation = tree.getDropLocation();
		if (dropLocation != null
				&& dropLocation.getChildIndex() == -1
				&& tree.getRowForPath(dropLocation.getPath()) == row) {
			// already set
		} else if (sel) {
			// already set
		} else {*/
			setForeground(((ColoredNode) value).getColor());
		//}

		return this;
	}
}